<extend name="Public/layout"/>
<block name="head">
<link rel="stylesheet" href="__PUBLIC__css/send_pack.css">
<style type="text/css">
.footer{
    display: none !important;
}
</style>
<link rel="stylesheet" href="__PUBLIC__css/usercenter.css">

</block>
    
   <block name="main">
      <div class="my-platform">
           <div class="my-platform-content">
            <ul class="my-platform-wrapper">
                <foreach name="platform_list" item="v">
                    <li class="my-platform-item">
                        <div class="platform-wrapper">
                            <!--给下面的platform-item循环-->
                            <foreach name="v.scheme" item="vv">
                                <div class="platform-item">
                                    <div class="item-header">
                                        <div class="plat-logo-wrapper">
                                            <img src="{$v.pic}?x-oss-process=image/resize,w_110" alt="">
                                        </div>
                                        <div class="plat-return-type-wrapper">
                                            <p>首投奖励</p>
                                        </div>
                                    </div>
                                    <div class="item-title">
                                      <div class="item-num">
                                        <h4>投资{$vv.scheme}</h4>
                                      </div>
                                     <!--  <div class="spread-btn-wrapper">
                                        <a class="spread-btn"
                                               href="/Home/circle/set_pack/platform_id/{$vv.platform_id}">设置红包金额</a>
                                        </div> -->
                                    </div>
                                    <div class="item-content">
                                            <ul class="item-content-wrapper">
                                                <li>
                                                    <p><em>{$vv.p_user_award}</em>元</p>
                                                    <p class="item-desc">用户返利</p>
                                                </li>
                                                <li>
                                                    <p><em>{$vv.p_push_award}</em>元</p>
                                                    <p class="item-desc">邀请返利</p>
                                                </li>
                                                <li>
                                                    <p><em>{$vv.yields}</em></p>
                                                    <p class="item-desc">往期年化</p>
                                                </li>
                                            </ul>
                                            <ul class="item-content-wrapper">
                                                <li>
                                                    <p><em>{$vv.start_amount}</em>元</p>
                                                    <p class="item-desc">起投金额</p>
                                                </li>
                                                <li>
                                                    <p><em>{$vv.deadline}</em><if condition="$vv.deadline_unit eq 0">月<else/>天</if></p>
                                                    <p class="item-desc">投资期限</p>
                                                </li>
                                                <li>
                                                    <!-- <if condition="$v[platform_info][team_type] eq 'ROI'">
                                                        <p>多投多返</p>
                                                        <elseif condition="$v[platform_info][team_type] eq 'CPA'"/>
                                                        <p>首投返利</p>
                                                        <elseif condition="$v[platform_info][team_type] eq 'CPA+CPS'"/>
                                                        <p>首投+加息返利</p>
                                                    </if>

                                                    <p class="item-desc">返利类型</p> -->
                                                    <a href="/Home/Recommend/m_marketing/recommend_id/{$user}"><span>立即邀请好友</span></a>
                                                </li>
                                            </ul>
                                    </div>
                                </div>
                            </foreach>
                        </div>
                        <notempty name="v.scheme">
                        <div class="more-btn" onclick="viewMore(this)">更多投资方案</div>
                        </notempty>
                    </li>
                </foreach>
                <foreach name="un_hz_plat" item="v">
                    <li class="my-platform-item">
                        <div class="item-header">
                            <div class="plat-logo-wrapper">
                                <img src="{$v.pic}?x-oss-process=image/resize,w_110" alt="">
                            </div>
                            <div class="plat-return-type-wrapper">
                                <p>{$v.team_type}</p>
                            </div>
                            <div class="spread-btn-wrapper">
                                <a class="spread-btn" href="javascript:" onclick="apply_platfrom({$v.id})">认领平台</a>
                            </div>
                        </div>
                        <div class="item-content">
                            <ul class="item-content-wrapper">
                                <li>
                                    <p><em>{$v.user_award}</em>元</p>
                                    <p class="item-desc">用户返利</p>
                                </li>
                                <li>
                                    <p><em>{$v.push_award}</em>元</p>
                                    <p class="item-desc">邀请返利</p>
                                </li>
                                <li>
                                    <p><em>{$v.yields}</em></p>
                                    <p class="item-desc">往期年化</p>
                                </li>
                            </ul>
                            <ul class="item-content-wrapper">
                                <li>
                                    <p><em>{$v.start_amount}</em>元</p>
                                    <p class="item-desc">起投金额</p>
                                </li>
                                <li>
                                    <p><em>{$v.deadline}</em></p>
                                    <p class="item-desc">投资期限</p>
                                </li>
                                <li>
                                    <if condition="$v[team_type] eq 'ROI'">
                                        <p>多投多返</p>
                                        <elseif condition="$v[team_type] eq 'CPA'"/>
                                        <p>首投返利</p>
                                        <elseif condition="$v[team_type] eq 'CPA+CPS'"/>
                                        <p>首投+加息返利</p>
                                    </if>

                                    <p class="item-desc">返利类型</p>
                                </li>
                            </ul>
                        </div>
                    </li>
                </foreach>

            </ul>
        </div>
          </div>
   </block>

    
    <block name="js">
      <script type="text/javascript">
            var itemH = $(".platform-wrapper").height();
            function viewMore(obj) {
                    if ($(obj).text() == "更多投资方案") {
                        $(obj).text("收起更多方案")
                        $(obj).parent().children(".platform-wrapper").css("maxHeight", "100%")
                    } else {
                        $(obj).text("更多投资方案")
                        var itemH = $(".platform-wrapper .platform-item").height();
                        $(obj).parent().children(".platform-wrapper").css("maxHeight", itemH)
                    }
                }
      </script>
    </block>